package cn.edu.shiep.aurora.gunwar;

import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.ImageView;

public class Introduction extends Activity {
	private AnimationDrawable animationDrawable;
	private ImageView ivtest;
	private ImageButton btnback;

	/*
	 * (non-Javadoc)
	 * 
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.animationlayout);

		btnback = (ImageButton) findViewById(R.id.imageButton1);
		btnback.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Introduction.this.finish();

			}
		});
		ivtest = (ImageView) findViewById(R.id.iv);
		animationDrawable = (AnimationDrawable) getResources().getDrawable(
				R.anim.tests);
		ivtest.setBackgroundDrawable(animationDrawable);
		new Thread() {

			/*
			 * (non-Javadoc)
			 * 
			 * @see java.lang.Thread#run()
			 */
			@Override
			public void run() {
				// TODO Auto-generated method stub
				super.run();
				animationDrawable.start();
			}

		}.start();

	}

}
